#pragma once

#include <uriparser/Uri.h>
#include <string>

using std::string;

class URI
{
private:
	UriParserStateA state;
	UriUriA uri;
public:
	URI(void);
	virtual ~URI(void);
	/**
	 * Parse uri
	 */
	bool parseURI(const char* uriStr);
	bool parseURI(const string& uriStr);

	/**
	 * Get the scheme of this uri
	 */
	string getScheme() const;
	/**
	 * Get the host of this uri
	 */
	string getHost() const;

	/**
	 * Get the port of this uri
	 */
	int getPort() const;
};
